Integrand size = 27, antiderivative size = 53 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\text {arctanh}(\cos (c+d x))}{2 a d}+\frac {\cot (c+d x)}{a d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a d} \]
Time = 0.88 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.77 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\left (\csc \left (\frac {1}{2} (c+d x)\right )+\sec \left (\frac {1}{2} (c+d x)\right )\right )^2 \left (-\cos (c+d x)+\left (-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sin ^2(c+d x)+\sin (2 (c+d x))\right )}{8 a d (1+\sin (c+d x))} \]
((Csc[(c + d*x)/2] + Sec[(c + d*x)/2])^2*(-Cos[c + d*x] + (-Log[Cos[(c + d *x)/2]] + Log[Sin[(c + d*x)/2]])*Sin[c + d*x]^2 + Sin[2*(c + d*x)]))/(8*a* d*(1 + Sin[c + d*x]))
Time = 0.41 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.98, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {3042, 3318, 3042, 4254, 24, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2}{\sin (c+d x)^3 (a \sin (c+d x)+a)}dx\) |
\(\Big \downarrow \) 3318 |
\(\displaystyle \frac {\int \csc ^3(c+d x)dx}{a}-\frac {\int \csc ^2(c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \csc (c+d x)^3dx}{a}-\frac {\int \csc (c+d x)^2dx}{a}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\int 1d\cot (c+d x)}{a d}+\frac {\int \csc (c+d x)^3dx}{a}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\int \csc (c+d x)^3dx}{a}+\frac {\cot (c+d x)}{a d}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}}{a}+\frac {\cot (c+d x)}{a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}}{a}+\frac {\cot (c+d x)}{a d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}}{a}+\frac {\cot (c+d x)}{a d}\) |
3.4.3.3.1 Defintions of rubi rules used
Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^( n_.))/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g^2/a Int [(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Simp[g^2/(b*d) Int [(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.19 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.28
method | result | size |
parallelrisch | \(\frac {-\left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+4 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d a}\) | \(68\) |
derivativedivides | \(\frac {\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}{4 d a}\) | \(72\) |
default | \(\frac {\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}{4 d a}\) | \(72\) |
risch | \(\frac {{\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}+2 i {\mathrm e}^{2 i \left (d x +c \right )}-2 i}{a d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d a}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d a}\) | \(95\) |
norman | \(\frac {-\frac {\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}-\frac {1}{8 a d}+\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d a}-\frac {3 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d a}+\frac {\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d a}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}\) | \(128\) |
1/8*(-cot(1/2*d*x+1/2*c)^2+tan(1/2*d*x+1/2*c)^2+4*cot(1/2*d*x+1/2*c)+4*ln( tan(1/2*d*x+1/2*c))-4*tan(1/2*d*x+1/2*c))/d/a
Time = 0.28 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.66 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {{\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 4 \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right )}{4 \, {\left (a d \cos \left (d x + c\right )^{2} - a d\right )}} \]
-1/4*((cos(d*x + c)^2 - 1)*log(1/2*cos(d*x + c) + 1/2) - (cos(d*x + c)^2 - 1)*log(-1/2*cos(d*x + c) + 1/2) + 4*cos(d*x + c)*sin(d*x + c) - 2*cos(d*x + c))/(a*d*cos(d*x + c)^2 - a*d)
\[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {\cos ^{2}{\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \]
Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (49) = 98\).
Time = 0.20 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.17 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{a} - \frac {4 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {{\left (\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{2}}{a \sin \left (d x + c\right )^{2}}}{8 \, d} \]
-1/8*((4*sin(d*x + c)/(cos(d*x + c) + 1) - sin(d*x + c)^2/(cos(d*x + c) + 1)^2)/a - 4*log(sin(d*x + c)/(cos(d*x + c) + 1))/a - (4*sin(d*x + c)/(cos( d*x + c) + 1) - 1)*(cos(d*x + c) + 1)^2/(a*sin(d*x + c)^2))/d
Time = 0.41 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.77 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\frac {4 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} + \frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}} - \frac {6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]
1/8*(4*log(abs(tan(1/2*d*x + 1/2*c)))/a + (a*tan(1/2*d*x + 1/2*c)^2 - 4*a* tan(1/2*d*x + 1/2*c))/a^2 - (6*tan(1/2*d*x + 1/2*c)^2 - 4*tan(1/2*d*x + 1/ 2*c) + 1)/(a*tan(1/2*d*x + 1/2*c)^2))/d
Time = 9.47 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.64 \[ \int \frac {\cot ^2(c+d x) \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,a\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {1}{2}\right )}{4\,a\,d} \]